package com.cloudy.ec2.request;

public class RevokeSecurityGroupIngress extends EC2Request {
	enum IpProtocol{
		TCP("tcp"),
		UDP("udp"),
		ICMP("icmp");
		private final String value;
		IpProtocol(String value){
			this.value = value;
		}
		@Override
		public String toString() {
			return value;
		}
	}


	public RevokeSecurityGroupIngress(String groupName, String sourceSecurityGroupName, String sourceSecurityGroupOwnerId) {
		putAttribute("GroupName", groupName);
		putAttribute("SourceSecurityGroupName", sourceSecurityGroupName);
		putAttribute("SourceSecurityGroupOwnerId", sourceSecurityGroupOwnerId);
	}
	public RevokeSecurityGroupIngress(String groupName, IpProtocol ipProtocol, int fromPort, int toPort, String cidrIp) {
		putAttribute("GroupName", groupName);
		putAttribute("IpProtocol", ipProtocol.toString());
		putAttribute("FromPort", String.valueOf(fromPort));
		putAttribute("ToPort", String.valueOf(toPort));
		putAttribute("CidrIp", cidrIp);
		// TODO Auto-generated constructor stub
	}


}
